home *** CD-ROM | disk | FTP | other *** search
- public class Lightning extends Codex {
- public void beginscene(int clientGuid, int captureID) {
- Codex.DisableLightStyle(7);
- Codex.MaterialSetFrame("lightning1", 0);
- Codex.DisableLightStyle(8);
- Codex.MaterialSetFrame("lightning2", 0);
- Codex.DisableLightStyle(9);
- Codex.MaterialSetFrame("lightning3", 0);
- Codex.MaterialSetFrame("lightningflare1", 0);
- Codex.MaterialSetFrame("lightningflare2", 0);
- Codex.MaterialSetFrame("lightningflare3", 0);
- ((Codex)this).SetTimer((float)((double)1.0F + Math.random() * (double)3.0F), 7, 0.0F);
- ((Codex)this).SetTimer((float)((double)1.0F + Math.random() * (double)3.0F), 8, 0.0F);
- ((Codex)this).SetTimer((float)((double)1.0F + Math.random() * (double)3.0F), 9, 0.0F);
- }
-
- public void timer(int timerID, float arg0, float arg1, float arg2, float arg3) {
- switch (timerID) {
- case 7:
- if (arg0 == 1.0F) {
- Codex.DisableLightStyle(7);
- Codex.MaterialSetFrame("lightning1", 0);
- Codex.MaterialSetFrame("lightningflare1", 0);
- ((Codex)this).SetTimer((float)((double)1.0F + Math.random() * (double)3.0F), 7, 0.0F);
- } else {
- Codex.EnableLightStyle(7);
- Codex.MaterialSetFrame("lightning1", 1);
- Codex.MaterialSetFrame("lightningflare1", 1);
- ((Codex)this).SetTimer(0.2F, 7, 1.0F);
- }
- break;
- case 8:
- if (arg0 == 1.0F) {
- Codex.DisableLightStyle(8);
- Codex.MaterialSetFrame("lightning2", 0);
- Codex.MaterialSetFrame("lightningflare2", 0);
- ((Codex)this).SetTimer((float)((double)1.0F + Math.random() * (double)3.0F), 8, 0.0F);
- } else {
- Codex.EnableLightStyle(8);
- Codex.MaterialSetFrame("lightning2", 1);
- Codex.MaterialSetFrame("lightningflare2", 1);
- ((Codex)this).SetTimer(0.2F, 8, 1.0F);
- }
- break;
- case 9:
- if (arg0 == 1.0F) {
- Codex.DisableLightStyle(9);
- Codex.MaterialSetFrame("lightning3", 0);
- Codex.MaterialSetFrame("lightningflare3", 0);
- ((Codex)this).SetTimer((float)((double)1.0F + Math.random() * (double)3.0F), 9, 0.0F);
- } else {
- Codex.EnableLightStyle(9);
- Codex.MaterialSetFrame("lightning3", 1);
- Codex.MaterialSetFrame("lightningflare3", 1);
- ((Codex)this).SetTimer(0.2F, 9, 1.0F);
- }
- }
-
- }
- }
-